<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
  <head>
    <title>资源列表</title>
    <link href="css/general.css" rel="Stylesheet" type="text/css" />
  </head>
  
  <body>
  <div align="center">
   	<table border="1" bordercolor="black" bgcolor="silver" > 
  <tr><td>编号</td><td>资源名称</td><td>类型</td><td>描述</td><td>图片</td><td>资源路径</td><td>操作者</td><td>创建时间</td><td>修改时间</td></tr>
    <s:iterator id ="resource" value="resourceList">
    <tr>
    <td>${id}</td>
    <td>${name }</td>
    <td><s:if test="%{#resource.type == 1}">
    	主日录音
        </s:if>
        <s:if test="%{#resource.type == 2}" >
                      属灵文章
        </s:if>
    </td>
    <td>${description }</td>
    <td><img alt="cover" class="newest_img" src="userfiles/image/${image}" /></td>
    <td><a href="${resource.url}" target="_blank">${url }</a></td>
    <td>${operator }</td>
    <td><s:date name='gmtCreate' format='yyyy-MM-dd HH:mm'/></td>
    <td><s:date name='gmtModify' format='yyyy-MM-dd HH:mm'/></td>
    <td><a href='<s:url action="editResource"><s:param name="id" value="id" /></s:url>'>修改</a>&nbsp;
    <a onclick="return confirm('确定要删除吗？');" href='<s:url action="delResource"><s:param name="id" value="id" /></s:url>'>删除</a></td>
    </tr>
    </s:iterator>
  </table>
  <p>
   	 <a href='<s:url action="beforeAddResource"/>'>新增资源</a>
   </p>
   </div>
  </body>
</html>
